package com.threegroup.common.utils;


import com.threegroup.common.exception.ParamsException;

/**
 * 校验类
 */
public class AssertUtil {


    /**
     * 判断条件是否满足
     *  如果条件满足，则抛出参数异常
     */
    public  static void isTrue(Boolean flag, String msg){
        if(flag){
            throw  new ParamsException(msg);
        }
    }

    public  static void isTrue(Boolean flag,int code ,String msg){

        if (flag){
            throw new ParamsException(code,msg);
        }
    }

}
